package bch.rocketmq.test;

public class UserThreadExitDemo {
    public static void main(String[] args) {
        Thread user = new Thread(() -> {
            try {
                System.out.println("用户线程开始执行");
                Thread.sleep(3000);
            } catch (InterruptedException e) {
                System.out.println("用户线程被中断");
            } finally {
                System.out.println("用户线程 finally 执行");
            }
        });
        user.start();

        System.out.println("主线程结束");
    }
}
